<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>All Comments</title>
</head>
<body>
    <h1>All Comments</h1>
    <form method="POST" action="{{ url_for('comment') }}">
        <textarea name="content" rows="4" cols="50"></textarea><br>
        <button type="submit">Submit Comment</button>
    </form>
    <ul>
        {% for comment in comments %}
        <li>
            <strong>{{ comment.UserID | get_user_name }}:</strong>
            {{ comment.CommentContent }}
            {% if comment.Timestamp %}
            <em>{{ comment.Timestamp.strftime('%Y-%m-%d %H:%M:%S') }}</em>
            {% endif %}
        </li>
        {% endfor %}
    </ul>
    <a href="{{ url_for('profile') }}">Back to Profile</a>
</body>
</html>
